Objective· Create and use queuesInstructionsDevelop a java program that simulates the queues in a bank. Bank Queue Simulation ProblemImplement the event-driven...
Objective
· Create and use queues
Instructions
Develop a java program that simulates the queues in a bank.
Bank Queue Simulation Problem
Implement the event-driven simulation of a bank that this chapter described on pages 434 through 444. A queue of arrival events will represent the line of customers in the bank. Maintain the arrival events and departure events in an ADT event list, sorted by the time of the event.
The input is a text file of arrival and transaction times. Each line of the file contains the arrival time and required transaction time for a customer. The arrival times are ordered by increasing time.
Your program must count customers and keep track of their cumulative waiting time. These statistics are sufficient to compute the average waiting time after the last event has been processed.
Display trace of the events executed and a summary of the computed statistics (total number of arrivals and average time spent waiting in line). For example, the input file shown in the left columns of the following table should produce the output shown in the right column.
Input File | Output | |
1 | 5 | Simulation Begins |
2 | 5 | Processing an arrival event at time: 1 |
4 | 5 | Processing an arrival event at time: 2 |
20 | 5 | Processing an arrival event at time: 4 |
22 | 5 | Processing a departure event at time: 6 |
24 | 5 | Processing a departure event at time: 11 |
26 | 5 | Processing a departure event at time: 16 |
28 | 5 | Processing an arrival event at time: 20 |
30 | 5 | Processing an arrival event at time: 22 |
88 | 3 | Processing an arrival event at time: 24 |
Processing a departure event at time: 25 | ||
Submit
Submit the following:
· UML diagram for the application
· Text file(s) containing the classes and methods
· Text file containing the results
12 years ago
20
Purchase the answer to view it

- queue_simulation_f.doc
- Sexual Harassment and Workplace Relationships
- WK 6 HM CHP 12 FIN 550
- Religions of the World homework help
- probability statistics
- University of Phoenix LAW 531 - Week 3 Quiz
- Bus 508 Assignment 4 Internet Technology, Marketing, and Security
- URGENT: Due in 3 hours!
- Imagine you are a recently-hired Chief Operating Officer (COO) in a midsize company preparing for an Initial Public Offering (IPO). You quickly discover multiple personnel problems that require your immediate attention.
- The_Writer only
- Public Administration